package com.cuicuisha.gxyp.feign.product;

import com.cuicuisha.gxyp.feign.product.fallback.ProductFeignClientFallback;
import com.cuicuisha.gxyp.model.dto.product.SkuSaleDto;
import com.cuicuisha.gxyp.model.entity.product.ProductSku;
import com.cuicuisha.gxyp.model.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * ClassName: ProductFeignClient
 * Description:
 *
 * @Author 脆脆鲨
 * @Create 2024-09-22 22:03
 * @Version 1.0
 */
@FeignClient(value = "service-product")
public interface ProductFeignClient {

    @GetMapping("/api/product/getBySkuId/{skuId}")
    ProductSku getBySkuId(@PathVariable Long skuId);

    @PostMapping("/api/product/updateSkuSaleNum")
    Boolean updateSkuSaleNum(@RequestBody List<SkuSaleDto> skuSaleDtoList);
}
